import random
def pd(temp):
    guess = int(temp)
    while guess != secret:
        temp = input("哎呀，猜错了，请重新输入吧:")
        guess = int(temp)
        if guess == secret:
            print("我草，你是小甲鱼心里的蛔虫吗？！")
            print("哼，猜中了也没有奖励！")
        else:
            if guess > secret:
                print("哥，大了大了~~~")
            else:
                print("嘿，小了，小了~~~")
    print("游戏结束，不玩啦^_^")
try:
    secret = random.randint(1,10)
    print('------------------我爱鱼C工作室------------------')
    temp = input("不妨猜一下小甲鱼现在心里想的是哪个数字：\n")
    pd(temp)
except ValueError as why:
    print('错误类型：%s \n请输入整数' % str(why))
    temp = input("请重新输入吧:")
    pd(temp)
except EOFError:
    print('请不要同时按下 Ctrl+d')
    temp = input("请重新输入吧:")
    pd(temp)
except KeyboardInterrupt:
    print('请不要同时按下 Ctrl+c')
    temp = input("请重新输入吧:")
    pd(temp)



